package com.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Author:sun
 * Date:2021/12/20
 * Note:*
 **/
@Controller
//可省略RequestMapping,即不带/page前缀；
@RequestMapping("/page")
public class PageController {

    @RequestMapping("/testT.html")
    //测试网址：http://localhost:8080/page/testT.html；
    public String test(){

        //这里的“test”要和test.html一致；
        return "test";
    }

    @RequestMapping("/a.html")
    public String aTest(){
        return "a";
    }
}
